#include "header.h"
SampleQuestion::SampleQuestion()
{
}
SampleQuestion::SampleQuestion(const char *docIdMapFile, int docNum)
{
    this->load(docIdMapFile, docNum);
}

void SampleQuestion::load(const char *docIdMapFile, int docNum)
{
    if (strlen(docIdMapFile) < 1) {
        cout << "docIdMapFile name is empty!" << endl;
        exit(1);
    }
    this->docNum = docNum;
    this->qIdMap.resize(docNum+1);
    //加载qid-clusterId 映射文件
    int mapNum = loadIntVector(docIdMapFile, this->qIdMap);
    cout << "Finish reading " << mapNum << " qIdMap!" << endl;
}

SampleQuestion::~SampleQuestion()
{
   this->qIdMap.clear();
}
